package xyz.labmem.base.core.common.response

import io.swagger.annotations.ApiModel
import io.swagger.annotations.ApiModelProperty
import java.util.*

/**
 * @Author lty
 * @Date 2022/1/12 9:46
 */
@ApiModel(description = "分页动态表头统一返回")
class ComPageAndColumnRes<T> {

    @ApiModelProperty(value = "分页表值")
    var list: MutableList<T>? = null

    @ApiModelProperty(value = "动态表头")
    var column: TreeMap<Int, PageColumn>? = null

}

@ApiModel(description = "统计图表头统一返回")
class ChartAndColumnRes<T> {

    @ApiModelProperty(value = "分页表值")
    var list: List<T>? = null

    @ApiModelProperty(value = "动态表头")
    var column: TreeMap<Int, PageColumn>? = null

    @ApiModelProperty(value = "单位")
    var unitMap: HashMap<String, String>? = null

}


@ApiModel(description = "分页动态表头统一返回")
class ComAndColumnRes<T> {

    @ApiModelProperty(value = "分页表值")
    var list: List<T>? = null

    @ApiModelProperty(value = "动态表头")
    var column: TreeMap<Int, PageColumn>? = null

}
@ApiModel(description = "表头")
class PageColumn {

    @ApiModelProperty(value = "字段")
    var key: String? = null

    @ApiModelProperty(value = "字段名")
    var value: String? = null

    @ApiModelProperty(value = "字段名")
    var name: String? = null

    @ApiModelProperty(value = "单位")
    var uint: String? = null

    @ApiModelProperty(value = "排序")
    var order: Int = 0
}

class ResData<T> {

    @ApiModelProperty(value = "字段")
    var data: T? = null

    @ApiModelProperty(value = "字段名")
    var list : ArrayList<PageColumn>? =null

}